package game;

public class Player {
	String name;
	int xpos;
	int ypos;
	private int point;
	String direction;
	int color = 1;

	public Player(String name) {
		this.name = name;
		xpos = 9; // TODO see server.server.broadcastNewPlayer()
		ypos = 7;
		setPoint(0);
		direction = "up";
	}

	public String getName() {
		return name;
	}

	public int getXpos() {
		return xpos;
	}

	public void setXpos(int xpos) {
		this.xpos = xpos;
	}

	public int getYpos() {
		return ypos;
	}

	public void setYpos(int ypos) {
		this.ypos = ypos;
	}

	public String getDirection() {
		return direction;
	}

	public void setDirection(String direction) {
		this.direction = direction;
	}

	String ToString() {
		return name + "   " + getPoint();
	}

	void addOnePoint() {
		setPoint(getPoint() + 1);
	}

	void subOnePoint() {
		setPoint(getPoint() - 1);
	}

	public int getPoint() {
		return point;
	}

	public void setPoint(int point) {
		this.point = point;
	}

	public void setColor(int color) {
		this.color = color;
	}
	
	public int getColor() {
		return color;
	}
}
